package com.ctyun.xstore.vod.clip;

import java.io.IOException;

import com.ctyun.xstore.vod.clip.request.CreateVideoClipTaskRequest;
import com.ctyun.xstore.vod.clip.response.CreateVideoClipTaskResponse;
import com.ctyun.xstore.vod.common.AbstractGeneralClient;

public class VodClipClient extends AbstractGeneralClient {

	public VodClipClient(String accessKey, String secretKey) {
		super(accessKey, secretKey);
	}

	public VodClipClient(String host, String accessKey, String secretKey) {
		super(host, accessKey, secretKey);
	}

	public CreateVideoClipTaskResponse createVideoClipTask(CreateVideoClipTaskRequest request) throws IOException {
		if (null == request.getTemplateId()) {
			throw new IllegalArgumentException("转码模板id入参必传！");
		}
		return this.execute(request, CreateVideoClipTaskResponse.class);
	}
}
